package com.lyl.security.module.login.service;

import com.lyl.security.module.security.model.details.LoginUser;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Mr.Luo
 */
public interface TokenService {
    /**
     * 创建token
     * @param loginUser 登录用户
     * @return token
     */
    String createToken(LoginUser loginUser);

    /**
     * 获取登录用户
     * @param request 请求
     * @return 登录用户
     */
    LoginUser getLoginUser(HttpServletRequest request);

    void verifyToken(LoginUser loginUser);
}
